{extend name="base" /} {block name="body"}
<div class="layui-body">
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="layui-this">委托列表</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item layui-show">
				<form class="layui-form layui-form-pane" action="{:url('wtlist')}" method="get">
					<div class="layui-inline">
						<label class="layui-form-label">用户账号</label>
						<div class="layui-input-inline">
							<input type="text" name="keyword" value="{$keyword}" placeholder="请输入用户账号" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<select name="ziduan">
							<option value="id" {if $ziduan=='id' }selected{/if}>会员ID</option>
							<option value="mobile" {if $ziduan=='mobile' }selected{/if}>会员账号</option>
						</select>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">买/卖：</label>
						<div class="layui-input-inline">
							<select name="type">
								<option value="">全部</option>
								<option value="1" {if $type==1}selected{/if}>买入</option>
								<option value="2" {if $type==2}selected{/if}>卖出</option>
							</select>
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">开始时间</label>
						<div class="layui-input-block">
							<input type="text" id="datetime2" name="start_time" value="{$start_time}" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">结束时间</label>
						<div class="layui-input-block">
							<input type="text" id="datetime3" value="{$end_time}" name="end_time" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<button class="layui-btn">搜索</button>
					</div>
				</form>
				<hr>
				<table class="layui-table">
					<thead>
						<tr>
							<th>会员ID</th>
							<th>会员账号</th>
							<th>买入/卖出</th>
							<th>价格</th>
							<th>委托数量</th>
							<th>已成交</th>
							<th>未成交</th>
							<th>时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						{foreach name="list" item="vo"}
						<tr>
							<td>{$vo.uid}</td>
							<td>{$vo.mobile}</td>
							<td>{if $vo.type==1}买{else/}卖{/if}</td>
							<td>{$vo.price}</td>
							<td>{$vo.num}</td>
							<td>{$vo.num-$vo.rest_num}</td>
							<td>{$vo.rest_num}</td>
							<td>{$vo.add_time}</td>
							<td style="height: 30px;">
								<a href="{:url('order/wt_delete',['id'=>$vo['id']])}" class="layui-btn layui-btn-danger layui-btn-small ajax-delete">删除</a>
							</td>
						</tr>
						{/foreach}
					</tbody>
				</table>
				<!--分页-->
				{$list->render()}
			</div>
		</div>
	</div>
</div>
<script>
	// 定义全局JS变量
	var GV = {
		current_controller: "adminjcb/{$controller}/wtlist"
	};
</script>
{/block}